Skip to content

Unify date formatting, base it on locale#1509

Closed
Arnei wants to merge 10000 commits intoopencast:developfrom
Arnei:date-display-unification
Closed

Unify date formatting, base it on locale#1509
Arnei wants to merge 10000 commits intoopencast:developfrom
Arnei:date-display-unification

Conversation

@Arnei
Copy link
Copy Markdown
Member

@Arnei Arnei commented Feb 19, 2026

This patch aims for a consistent date display across the entire ui. That it is not always consistent can be seen for example in the event details metadata, where the start date is formatted differently from the created date.

Furthermore, this patch aims to base date formatting more on the chosen locale to create a more intuitive experience for users. No more A.M./P.M. in the german locale for example.

To achieve this, date-fns is chosen as the gold standard and momentjs is removed from the project completely. Not only because moment is legacy, but also because our datepickers were using date-fns already and will not use anything else.

Additionally, this removes our custom date formatting from the translation files and replaces it with date-fns tokens. In my opinion, we do not need to try and be smarter than our datetime library when it comes to formatting dates. Translators retain the ability to enforce their favourite formatting should they so chose,
but will have to be aware that it will not be respect everywhere, e.g. not in the datepickers.

This patch contains changes to all translation files. I am aware that everything except en_US will get overwritten, the changes to other languages are merely for ease of reviewing. If this patch is merged, the translations should be adapted asap as per this example.

Before:
Bildschirmfoto vom 2026-02-19 13-50-34

After:
Bildschirmfoto vom 2026-02-19 13-50-42

Fixes #1279

How to test this

Can be tested as is. Check anything with dates. Special attention should be payed to the statistics tab and scheduling. Ideally we get people who use other locales apart from the english ones to test this, so they can mention if anything looks very odd in their favourite locale now.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On THE Event details dialog 'Start date' and 'Created' date don't have the same format